package dparish.client.places;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

import dparish.client.proxy.StudentProxy;

public class StudentAddEditPlace extends Place {

	private StudentProxy student;
	private String uniqueId;
	
	/**
	 * @return the student
	 */
	public StudentProxy getStudent() {
		return student;
	}
	
	public String getUniqueId() {
		return uniqueId;
	}

	/**
	 * @param student the student to set
	 */
	public void setStudent(StudentProxy student) {
		this.student = student;
	}

	public StudentAddEditPlace(String uniqueId) {
		this.uniqueId = uniqueId;
	}

	public static class Tokenizer implements PlaceTokenizer <StudentAddEditPlace> {

		@Override
		public StudentAddEditPlace getPlace(String token) {
			return new StudentAddEditPlace(token);
		}

		@Override
		public String getToken(StudentAddEditPlace place) {
			return place.getUniqueId();
		}
		
	}
}
